package com.dandelion.api.controller;

import com.dandelion.api.domain.NewestOrder;
import com.dandelion.api.manager.UserOrderManager;
import com.rockit.core.pojo.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/index/")
public class IndexController extends BaseRestController {
    @Autowired
    private UserOrderManager userOrderManager;

    @RequestMapping("/order/newest")
    public JsonResult queryNewestOrderByMobile() {
        List<NewestOrder> vo = userOrderManager.queryNewestOrderList();
        return ok(vo);
    }
}
